function CodeUserName(name) {
    var time = Math.floor((new Date()).getTime() / 1000);
    var timediv5 = Math.floor(time / 5);
    var timestr = ""
    for (var i = 0; i != 4; ++i) {
        timestr += String.fromCharCode((timediv5 >> ((3 - i) * 8)) % 256);
    }
    var data = timestr;
    data += name.substr(0, 12);
    data += "chongqingradius1";
    var aftermd5 = hex_md5(data);
    var sig = aftermd5.substring(0, 2);

    var temp = new Array(32);
    var timechar = new Array(4);
    for (var i = 0; i != 4; ++i) timechar[i] = timestr.charCodeAt(i);
    for (i = 0; i < 32; i++) {
        temp[i] = timechar[(31 - i) >> 3] & 1;
        timechar[(31 - i) >> 3] = timechar[(31 - i) >> 3] >> 1;
    }
    var timeHash = new Array(4);
    for (var i = 0; i < 4; i++) {
        timeHash[i] = temp[i] * 128 + temp[4 + i] * 64 + temp[8 + i]
		        * 32 + temp[12 + i] * 16 + temp[16 + i] * 8 +
			        temp[20 + i]
		        * 4 + temp[24 + i] * 2 + temp[28 + i];
    }

    temp[1] = (timeHash[0] & 3) << 4;
    temp[0] = (timeHash[0] >> 2) & 0x3F;
    temp[2] = (timeHash[1] & 0xF) << 2;
    temp[1] = (timeHash[1] >> 4 & 0xF) + temp[1];
    temp[3] = timeHash[2] & 0x3F;
    temp[2] = ((timeHash[2] >> 6) & 0x3) + temp[2];
    temp[5] = (timeHash[3] & 3) << 4;
    temp[4] = (timeHash[3] >> 2) & 0x3F;
    var sig2 = "";
    for (i = 0; i < 6; i++) {
        var tp = temp[i] + 0x020;
        if (tp >= 0x40) {
            tp++;
        }
        sig2 += String.fromCharCode(tp);
    }
    return "\r\n" + sig2 + sig + name;
}